package com.lzy.system.organization.dto.convert;

import com.lzy.system.organization.dto.SysDepartmentOrderDTO;
import com.lzy.system.organization.entity.SysDepartment;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * description: 部门对象转换 <br>
 * date: 2023/12/5 上午9:12 <br>
 * author: lcc <br>
 * version: 1.0 <br>
 */
@Mapper(componentModel = "spring")
public interface SysDepartmentConvert {
    /**
     * 转换排序dto
     * @param sysDepartmentOrderDTO
     * @return
     */
    @Mapping(source = "order_index", target = "order_index")
    @Mapping(source = "id", target = "id")
    @Mapping(source = "pid", target = "pid")
    @Mapping(source = "dep_name_path_full", target = "dep_name_path_full")
    @Mapping(source = "dep_id_path_full", target = "dep_id_path_full")
    SysDepartment orderDTO_to_SysDepartment(SysDepartmentOrderDTO sysDepartmentOrderDTO);
    /**
     * 转换排序dto
     * @param sysDepartmentOrderDTOS
     * @return
     */
    List<SysDepartment> orderDTO_to_SysDepartment_list(List<SysDepartmentOrderDTO> sysDepartmentOrderDTOS);

}
